package com.hllxd.hism.star.basic.service.service.rock;

import com.hllxd.hism.star.basic.service.dao.mapper.mis.TaskRelationMapper;
import com.hllxd.hism.star.basic.service.model.rock.TaskRelation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.Collections;
import java.util.List;

/**
 * @Author wuguangxi
 * @Description
 * @Date 2024/3/14 11:07
 */
@Slf4j
@Service
public class TaskRelationServiceImpl implements TaskRelationService{

    @Autowired
    private TaskRelationMapper taskRelationMapper;

    @Override
    public List<TaskRelation> findAllRelation() {
        return taskRelationMapper.findAllRelation();
    }

    @Override
    public List<TaskRelation> findByTaskIds(List<String> taskIds) {
        if(CollectionUtils.isEmpty(taskIds)){
            return Collections.emptyList();
        }
        return taskRelationMapper.findByTaskIds(taskIds);
    }
}
